// for in 一般用来循环对象，for of 用来循环数组
const obj = {
  a: 1,
  b: 2,
  c: 3
}
for (let i in obj) {
  console.log(i)
  // a
  // b
  // c
}
for (let i of obj) {
  console.log(i)
  // Uncaught TypeError: obj is not iterable 报错了
}

const arr = ['a', 'b', 'c']
// for in 循环
for (let i in arr) {
    console.log(i)
    // 0
    // 1
    // 2
}

// for of
for (let i of arr) {
    console.log(i)
    // a
    // b
    // c
}

